#if !defined(AFX_CATALOGTREECTRL_H__BE086C8B_6C0A_4417_972F_984448F67E0B__INCLUDED_)
#define AFX_CATALOGTREECTRL_H__BE086C8B_6C0A_4417_972F_984448F67E0B__INCLUDED_

#pragma once

#include "CHTreeCtrl.h"

typedef struct CH_NODEINFOEX
{
	DWORD	Id;
	DWORD	Time;
	DWORD	SynId;
}
NODEINFOEX, *PNODEINFOEX;

class CCatalogTreeCtrl : public CHTreeCtrl  
{
public:
	CCatalogTreeCtrl() {}
	virtual ~CCatalogTreeCtrl() {}
	static PNODEINFOEX	GetNodeInfoEx(PNODEINFO pNode)
	{
		return (PNODEINFOEX) ((DWORD)pNode + sizeof(NODEINFO));
	}

public:
	virtual void SelectNodeEx(HTREEITEM hItem);
	virtual void UpdateNodeEx(HTREEITEM hItem);

protected:
	virtual void InitDataSize();
	virtual void ReadChildNode(HTREEITEM hItem);
	virtual void InsertNodeEx(PNODEINFO pNode);
	virtual void DeleteNodeEx(PNODEINFO pNode);
	virtual void ChangeTurnEx(PNODEINFO pNode);
	virtual BOOL CanDragTo(HTREEITEM hDragItemS, HTREEITEM hDragItemD);
	virtual void ChangeParent(HTREEITEM hItem, HTREEITEM hParentItem);

protected:
	public: virtual BOOL PreTranslateMessage(MSG* pMsg);

protected:
	afx_msg void OnClick(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnRclick(NMHDR* pNMHDR, LRESULT* pResult);

	DECLARE_MESSAGE_MAP()
};

#endif // !defined(AFX_CATALOGTREECTRL_H__BE086C8B_6C0A_4417_972F_984448F67E0B__INCLUDED_)
